package com.brillilab.domain.enums.experiment;

import com.brillilab.domain.enums.topic.TopicStateEnum;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum ExperimentStateEnum {
	NOT_STARTED("未开始",0),UNDER_WAY("进行中",1),COMPLETE("已结束",2);
	public String name;
    private Integer value;
    
    public static String getKey(Integer value) {
        for (TopicStateEnum p : TopicStateEnum.values()) {
            if (p.getValue().equals(value)) {
                return p.name;
            }
        }
        return null;
    }
}
